<?php

$strScreenName = 'EnterAuctionCommission';
$strQueryName = 'qryAddAuctionCommission';
$strFormName = 'frmEnterAuctionCommission';

     if ((($_POST[intAuctionCommissionID])||($_GET[intAuctionCommissionID])) && (!$_POST[$strReprocessing])) {
     		if($_POST[intAuctionCommissionID]){
     			$intAuctionCommissionID = $_POST[intAuctionCommissionID];
     		}else{
     			$intAuctionCommissionID = $_GET[intAuctionCommissionID];
     		}
             include (MODULE . "/action/qrySelectAuctionCommission");
             $strTitle = "Update";
             $strButtonTitle = "update";
             $txtCommission = stripslashes($myrow["Commission"]);
             $txtDivideBy = stripslashes($myrow["DivideBy"]);
         }else{
             $strTitle = "Enter";
             $strButtonTitle = "save";
             if($_POST[txtCommission]){ $txtCommission = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtCommission])); }
         	 if($_POST[txtDividedBy]){ $txtDivideBy = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtDividedBy])); }
     }
     
echo "
<tr>
     <td>
         <table  width='450' cellpadding='0' cellspacing='0' border='0' class='Normal' align='center'>
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>$strTitle AuctionCommission</H2>
         </td>
     </tr>
";
// Upploaded = 0
echo (StartForm($strScreenName, "post", $strQueryName,array('intAuctionCommissionID'=>$intAuctionCommissionID,'strReprocessing'=>'True'),"","",$strFormName,"","return frmEnterAuctionCommission_onsubmit()"));


echo "
     <tr>
         <td align='right' colspan='1'>
             <b>Commission :&nbsp;</b>
         </td>
         <td align='left' colspan='1'>
           <input type=\"text\" name=\"txtCommission\" value = \"$txtCommission\" size= \"5\" maxlength=\"5\">
         </td>
     </tr>

     <tr align='left'>
         <td align='right'>
             <b>Divide By :&nbsp;</b>
         </td>
         <td align='left'>
         	<input type=\"text\" name=\"txtDivideBy\" value = \"$txtDivideBy\" size= \"5\" maxlength=\"5\">
         </td>
     </tr>

     <tr>
         <td align='right' colspan='2'>
             <input type='image' src='./images/$strButtonTitle.gif' alt='$strButtonTitle'>
         </td>
     </tr>
         </table
     </form>
     </td>
 </tr>
";
     //$strListAll = "true";
       //include (MODULE . "/screen/ListAuctionCommission");
?>
<script language="JavaScript">
<!--
function frmEnterAuctionCommission_onsubmit() 
{
     if(document.frmEnterAuctionCommission.txtCommission.value == "") {
         alert("Please enter ");
         document.frmEnterAuctionCommission.txtCommission.focus();
         document.frmEnterAuctionCommission.txtCommission.select();
         return(false);
     }
     
     if(document.frmEnterAuctionCommission.txtDividedBy.value == "") {
         alert("Please enter ");
         document.frmEnterAuctionCommission.txtDividedBy.focus();
         document.frmEnterAuctionCommission.txtDividedBy.select();
         return(false);
     }
}
// -->
</script>
